<?
include("session.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/webkit/utils/jquery.js"></script>
<script type="text/javascript" src="/webkit/datepicker/WdatePicker.js"></script>
<link type="text/css" rel="stylesheet" href="page.css"/>
</head>
<body>

<table width=100% height=100% cellspacing=0 cellpadding=0>
	<tr bgcolor="#eeeeee">
	<form name=f>
	<td height=30>
		客户电话：<input type=text id='telephone' size=10 value='<?echo $_GET['telephone']?>'>　
		通话时间：<input type="text" id="begin_time" name="begin_time" onClick="WdatePicker({readOnly:true, skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" size="15" value="<?echo date("Y-m-01 00:00:00")?>"> - <input type="text" id="end_time" name="end_time" onClick="WdatePicker({readOnly:true, skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" size="15">　
		<input type="button" value="查询" onclick="search()" id="btn_search">　
	</td>
	</tr>
	<tr>
	<td>
		<iframe width=100% height=350 frameborder=0 name="record_frame" src="about:blank" marginheight=2 marginwidth=2 onload="search_completed()"></iframe>
	</td>
	</form>
	</tr>
</table>


<script type="text/javascript">
	var f = document.f;

	function search() { 
		var url = "http://222.240.139.227:9080/jinxun/record_file_list.jsp?";
		if($("#telephone").val() != "") {
			url += "telephone="+ $("#telephone").val();
		} else {
			alert("查询号码不能为空！");
			return false;
		}
		if($("#begin_time").val()!="") {
			url += "&begin_time="+ $("#begin_time").val();
		}
		if($("#begin_time").val()!="") {
			url += "&end_time="+ $("#end_time").val();
		}
		//alert(url);
		$("#btn_search").val("正在查询...");
		$("#btn_search").attr("disabled", true);
		window.frames['record_frame'].location = url;
	}

	function search_completed() {
		$("#btn_search").val("查询");
		$("#btn_search").attr("disabled", false);
	}

	$(function(){
		var iframe = window.frames['record_frame'];
		if (iframe.attachEvent){
			iframe.attachEvent("onload", function(){
				search_completed();
			});
		} 
	});
</script>
</body>
</html>
